from django.conf.urls import url

from login import views as login_views
from index import views as index_views
from AppMonitor import views as monitor_views
from AppMonitor import Monit
from HostManager import views as HM_views
from AppManager import views as AM_views
from DomainManager import views as DM_views
from UserManager import views as UM_views
from HostSetting import views as HS_views
from Logs import views as Logs_views
import AppMonitor.LastFork


Logs_views.log("系统完成启动")
urlpatterns = [
    url(r'.*html$', index_views.notfound),
    url(r'^$', index_views.index),
    url(r'^login$', login_views.login),
    url(r'^logout$', login_views.logout),
    url(r'^index$', index_views.index),
    url(r'^monitor_linux$', monitor_views.linuxpage),
    url(r'^monitor_zabbix$', monitor_views.zabbixpage),
    url(r'^monitor_monit$', Monit.MonitView),
    url(r'^MonitAdd$', Monit.MonitAdd),
    url(r'^refresh_zabbix$', monitor_views.refreshzabbix),
    url(r'^refresh$', monitor_views.refresh),
    url(r'^addhost$', HM_views.AddHost),
    url(r'^hostmanager$', HM_views.HostManager),
    url(r'^HostDel$', HM_views.HostDel),
    url(r'^hostlogs$', HM_views.HostLogs),
    url(r'^Webssh$', AM_views.Webssh),
    url(r'^ansible$', AM_views.ansible),
    url(r'^Fullscreenssh$', AM_views.FullScreenSsh),
    url(r'^mysql$', AM_views.WebMysql),
    url(r'^mysqlbyhost$', AM_views.WebMysql_Host),
    url(r'^mysqlbyip$', AM_views.WebMysql_Ip),
    url(r'^crontab$', AM_views.Crontab),
    url(r'^refreshCron$', AM_views.RefreshCron),
    url(r'^CronEdit$', AM_views.CronEdit),
    url(r'^CronAdd$', AM_views.CronAdd),
    url(r'^CronDel$', AM_views.CronDel),
    url(r'^firewall$', AM_views.FireWall),
    url(r'^FWDel$', AM_views.FWDel),
    url(r'^FWAdd$', AM_views.FWAdd),
    url(r'^refreshFW$', AM_views.refreshFW),
    url(r'^domains$', DM_views.DomainManager),
    url(r'^domains_host$', DM_views.DomainHost),
    url(r'^user_manager$', UM_views.UserManager),
    url(r'^users_manager$', UM_views.UsersManager),
    url(r'^user_setting$', UM_views.UserSetting),
    url(r'^refresh_user_manager$', UM_views.RefreshUser),
    url(r'^add_user$', UM_views.AddUser),
    url(r'^del_user$', UM_views.DelUser),
    url(r'^InvalidAuthority$', index_views.InvalidAuthority),
    url(r'^refresh_group$', UM_views.RefreshGroup),
    url(r'^add_group$', UM_views.AddGroup),
    url(r'^del_group$', UM_views.DelGroup),
    url(r'^hostsetting$', HS_views.HostSetting),
    url(r'^config$', HS_views.HostConfig),
    url(r'^addapp$', HS_views.InstallApp),
    url(r'^getInstalled$', HS_views.GetInstalled),
    url(r'^logs_system$', Logs_views.SystemLogs),
    url(r'^logs_user$', Logs_views.UserLogs),
    url(r'^logs_install$', Logs_views.InstallLogs),
    url(r'^getinstalllog/(.+)$', Logs_views.reInstallLogs),
    url(r'^.*', index_views.notfound)
]